package com.kang.c0c.tree.node;

import com.kang.c0c.symbol.FunctionSymbol;

/**
 * 定义抽象语法树的函数子节点
 * Function		：FUNCTION	函数
 * 
 * @field
 * sym			：此函数的符号表信息
 * block		：函数体内的程序序列块
 * 
 * @author kang
 *
 * Feb 6, 2009
 */
public class FunctionNode extends Node implements Nodes{
	private FunctionSymbol sym;
	private BlockNode block;
	
	public FunctionNode(){
		this(null,null);
	}
	
	public FunctionNode(FunctionSymbol sym,BlockNode block){
		super(FUNCTION);
		this.sym = sym;
		this.block = block;
	}

	public FunctionSymbol getSym() {
		return sym;
	}

	public void setSym(FunctionSymbol sym) {
		this.sym = sym;
	}

	public BlockNode getBlock() {
		return block;
	}

	public void setBlock(BlockNode block) {
		this.block = block;
	}
}
